<?php
require_once("class/Include.class.php"); 
$obj_site = new Site(); 
?>

<!doctype html>
<html>
<head>
<?php require_once('./includes/head.php'); ?>

<!--	==============================================================	-->
<!-- 	include jQuery + carouFredSel plugin	-->
<!--	==============================================================	-->
<script type="text/javascript" language="javascript" src="./jquery/carouFredSel-6.2.1/jquery.carouFredSel-6.2.1-packed.js"></script>

<!-- optionally include helper plugins -->
<script type="text/javascript" language="javascript" src="./jquery/carouFredSel-6.2.1/helper-plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" language="javascript" src="./jquery/carouFredSel-6.2.1/helper-plugins/jquery.touchSwipe.min.js"></script>
<script type="text/javascript" language="javascript" src="./jquery/carouFredSel-6.2.1/helper-plugins/jquery.transit.min.js"></script>
<script type="text/javascript" language="javascript" src="./jquery/carouFredSel-6.2.1/helper-plugins/jquery.ba-throttle-debounce.min.js"></script>



<script type="text/javascript" language="javascript">

//	Scrolled by user interaction
$(function() {
	//	Scrolled by user interaction
	$('#foo2').carouFredSel({
		prev: '#prev2',
		next: '#next2',
		pagination: "#pager2",
		mousewheel: true,
		swipe: {
			onMouse: true,
			onTouch: true
		},
		auto : {pauseDuration   : 3500,  pauseOnHover    : true , }
	});
	

	
});


</script>


<script type="text/javascript" src="./jquery/nivo-slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
    $('#portifolio_slider').nivoSlider({
        effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
        slices: 15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed: 500, // Slide transition speed
        pauseTime: 3000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: false, // Next & Prev navigation
        controlNav: true, // 1,2,3... navigation
        controlNavThumbs: false, // Use thumbnails for Control Nav
        pauseOnHover: true, // Stop animation while hovering
        manualAdvance: false, // Force manual transitions
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        randomStart: false, // Start on a random slide
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
});

</script>


</head>

<body class="bg_home">

<!--	==============================================================	-->
<!--	MENU	-->
<!--	==============================================================	-->
<?php require_once('./includes/topo.php') ?>


<!--	==============================================================	-->
<!--	CONTAINER	-->
<!--	==============================================================	-->
<div class="container">


	<!--	DESTAQUES	-->
    <div id="destaques">
        
        
        
        <div class="list_carousel">
				<ul id="foo2">
					
                    <?php
					$result = $obj_site->select("tb_categorias_produtos");
					if(mysql_num_rows($result) > 0)
					{
						while($row = mysql_fetch_array($result))
						{
							?>
                            <li>
                                <div class="destaques_slider_img">
                                    <img src="./uploads/tumb_<?php echo $row[imagem] ?>" alt="<?php util::imprime($row[titulo]); ?>">
                                </div>
                                
                                <div class="destaque_titulo">   
                                    <h4><?php util::imprime($row[titulo]); ?></h4>
                                    
                                    <a href="<?php echo Util::caminho_projeto(); ?>/lista-produtos/<?php util::imprime($row[url_amigavel]); ?>" title="Ver Todas" class="btn_destaque">
                                        VER TODAS
                                    </a>
                                    
                                </div>
                            </li>
                            <?php
						}
					}
					?>
                    
				</ul>
				<div class="clearfix"></div>
				
                <a href="javascript:void(0)" class="btn_destaque_anterior" id="prev2" title="Anterior" >
                    <img src="imgs/home_seta_esquerda.png" alt="Anterior">
                </a>
                
                <a href="javascript:void(0)" class="btn_destaque_proximo" id="next2" title="Próximo" >
                    <img src="imgs/home_seta_direita.png" alt="Próximo">
                </a>
                
                
				<div id="pager2" class="pager"></div>
			</div>
        
        
        
    </div>
    
    
    <!--	NOSSOS SERVICOS	-->
    <div id="nossos_servicos">
    	
        <div id="nossos_servicos_container">
    		
            <h1>CONHEÇA NOSSOS SERVIÇOS</h1>
            
            <br />
            
            <div style="height: 226px; overflow: hidden;">
				<?php 
                $dados = $obj_site->select_unico("tb_empresa", 'idempresa', 2);
                
                Util::imprime($dados[descricao]);
                ?>
            </div>
            
            <a href="../servicos" title="Ver Todas" class="btn_destaque">
                VER TODAS
            </a>
        
        </div>
        
    </div>
    
    
    <!--	PORTIFOLIO	-->
    <div id="portifolio">
    	
        <div id="portifolio_texto">
            <h2>CONFIRA NOSSO</h2>
            <h2><span>PORTIFÓLIO</span></h2>
        </div>
        
        <div id="portifolio_slider">
        	
            <?php
			$result = $obj_site->select("tb_portifolios", 'ORDER BY rand() LIMIT 6');
			if(mysql_num_rows($result) > 0)
			{
				while($row = mysql_fetch_array($result))
				{
					?>
					<a href="<?php echo Util::caminho_projeto(); ?>/uploads/<?php util::imprime($row[imagem]); ?>" title="<?php util::imprime($row[titulo]); ?>" class="group2" >
                        <img src="uploads/tumb_<?php echo $row[imagem] ?>" alt="<?php echo $row[titulo] ?>">
					</a>
                	<?php
				}
			}
			?>
            
        </div>
        
    </div>
    
    
    <!--	DICAS	-->
    <div id="dicas">
    	
    	<div id="dicas_interna">
        
        	<div id="dicas_interna_conteudo">
        
                <h2>Dicas preparadas especialmente para você</h2>
                
                
                <ul>
                    <?php
					$result = $obj_site->select("tb_dicas", 'ORDER BY rand() LIMIT 4');
					if(mysql_num_rows($result) > 0)
					{
						while($row = mysql_fetch_array($result))
						{
							?>
                            <li>
                                <a href="<?php echo Util::caminho_projeto(); ?>/dicas/<?php util::imprime($row[url_amigavel]); ?>" title="<?php Util::imprime($row[titulo]); ?>">
                                    <?php $obj_site->redimensiona_imagem("../uploads/".$row[imagem], 210, 129, array("alt"=>$row[titulo])); ?>
                                </a>
                                
                                <a href="<?php echo Util::caminho_projeto(); ?>/dicas/<?php util::imprime($row[url_amigavel]); ?>" title="<?php Util::imprime($row[titulo]); ?>">
                                    <h3><?php Util::imprime($row[titulo]); ?></h3>
                                </a>
                            </li>
                            <?php
						}
					}
					?>
                    
                </ul>
                
             </div>
        
        </div>
        
    
    </div>
    
    

</div>




<!--	==============================================================	-->
<!--	RODAPE	-->
<!--	==============================================================	-->
<?php require_once('./includes/rodape.php'); ?>



</body>
</html>